Variables are used to store and modify different data types like numbers, text, and booleans. Common variable data types include integers, longs, floats, doubles, booleans, and characters. Variables can store data through assignment like setting the number of days in a week to 7 or a name to a string. Data can also be modified through operations that change the value stored in a variable, such as adding or multiplying two integer variables.